package org.exez.modules.visitor.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.exez.modules.visitor.api.vo.WhiteListUpdateByApiVO;
import org.exez.modules.visitor.entity.WhiteList;
import com.baomidou.mybatisplus.extension.service.IService;
import org.exez.modules.visitor.vo.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.util.List;

/**
 * @Description: 白名单
 * @Author: exez-boot
 * @Date:   2020-06-27
 * @Version: V1.0
 */
public interface IWhiteListService extends IService<WhiteList> {

    /**
     * 添加白名单
     * @param whiteList
     * @return
     */
    String saveWhiteList(WhiteList whiteList);


    /**
     * 修改白名单
     * @param entity
     * @return
     */
    boolean updateWhiteList(WhiteList entity);


    /**
     * 修改白名单
     * @param whiteListUpdateVO
     * @return
     */
    boolean updateWhiteListByIdentityValue(WhiteListUpdateByApiVO whiteListUpdateVO);


    /**
     * 通过id 查找
     * @param id
     * @return
     */
    WhiteListVO getWhiteListById(Integer id);

    /**
     * 删除白名单
     * @param whiteLists
     * @return
     */
    boolean deletedWhiteList(List<WhiteList> whiteLists);

    /**
     * 白名单分页接口
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<WhiteListVO> listWhiteList(Page<WhiteList> page, LambdaQueryWrapper<WhiteList> queryWrapper);

    /**
     * 白名导入接口
     * @param
     * @param
     * @return
     */
    List<Integer> imPortExcl (List<WhiteListVOExcl> whiteLists) throws Exception;

    /**
     * 白名导入测试接口
     * @param
     * @param
     * @return
     */
    List<Integer> imPortExclTest (List<WhiteListVOExcl> whiteLists) throws Exception;



    /**
     * 白名图片导入接口
     * @param
     * @param
     * @return
     */
    void imPortPhoto (MultipartFile file) throws Exception;



    String chunkUploadByMappedByteBuffer1(MultipartFileParams param, String name) throws Exception;

    void updatePhoto (String idCard , String code);

    void policePay(String url,String secret,String payId);

    void insertWhite(WhiteList whiteList);

    /**
     * 推送 添加或者删除白名单
     */
    void pushSaveOrUpdate();

    /**
     * 手动同步没有头像的数据
     */
    void batchSyncWhiteList();
}
